package com.shop.front.response;

import com.shop.web.response.Ret;

/**
 * 项目错误码表
 */
public enum FrontRetEnum implements Ret {

    /** -------------------- user ---------------------------- */
    USER_NOT_EXISTS("30001", "该用户暂未注册!"),
    USER_NAME_OR_PWD_ERROR("30002", "用户名或密码错误!"),
    USER_IS_LOCKED("30003", "该账号已被锁定!"),
    USER_LOGIN_FAIL("30004", "登录失败!"),
    USER_PWD_VALID_EXCPTION("30005", "密码格式校验失败!"),
    USER_OLD_PWD_IS_NOT_EQUALS("30006", "旧密码不匹配，请重新输入!"),
    MOBILE_CAN_NOT_BE_NULL("30008", "手机号不能为空！"),
    MOBILE_IS_NOT_VALID("30009", "手机号格式不正确！"),
    SMS_CODE_SEND_ERROR("30010", "短信验证码发送失败！"),
    SMS_CODE_IS_ERROR("30011", "短信验证码错误！"),
    SMS_CODE_MOBILE_SEND_EXCESS("30012", "短信验证码发送次数已超出限制，请联系客服!"),
    SMS_CODE_IP_SEND_EXCESS("30013", "短信验证码发送次数已超限，请联系客服!"),
    SMS_CODE_SEND_EXCEPTION("30015", "短信验证码发送异常，请联系客服!"),
    USER_NEED_REAL_NAME_AUTH("30016", "用户未实名认证，请先实名!"),
    USER_NAME_IS_EXISTS("30017", "该用户已注册，请重新输入!"),
    REAL_NAME_AUTH_MOBILE_SEND_EXCESS("30021", "实名认证次数已超出限制，请联系客服!"),
    REAL_NAME_AUTH_IP_SEND_EXCESS("30022", "实名认证次数已超限，请联系客服!"),
    OPENID_IS_EXISTS("30023", "该微信已注册，请重新输入!"),
    USER_REAL_NAME_IS_AUTH("30025", "该用户已完成实名认证，请勿重复实名!"),
    USER_BALANCE_NOT_ENOUGH("30027", "账户余额不足!"),
    USER_SUB_BROKERAGE_FAIL("30028", "扣除用户佣金失败!"),
    USER_BROKERAGE_NOT_ENOUGH("30029", "账户佣金不足!"),
    USER_SUB_COIN_FAIL("30030", "扣除用户TG失败!"),
    USER_COIN_NOT_ENOUGH("30031", "账户TG不足!"),
    USER_INTEGRAL_NOT_ENOUGH("30032", "账户当前可抵扣积分不足，请点击“修改积分”!"),

    /** -------------------- store ---------------------------- */
    PRODUCT_STOCK_IS_NOT_ENOUGH("31004", "商品库存不足!"),


    /** -------------------- store ---------------------------- */
    PAY_NO_NOT_EXISTS("32001", "订单不存在！"),
    PAY_IS_EXCEPTION("32002", "支付异常！"),
    PAY_TYPE_IS_NOT_VALID("32003", "不支持的支付方式！"),

    PARAM_IS_ERROR("30026", "参数传入错误！"),


    ;



    private String code;
    private String msg;

    FrontRetEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
